<template>
      <tbody>
        <tr v-for="item in list" :key="item.id">
          <td>{{item.utime}}</td>
          <td>{{item.doctor}}</td>
          <td>{{item.results}}</td>
          <td>{{item.medicine}}</td>
          <td @click="openDetail(item.id)">详情</td>
        </tr>
      </tbody>
</template>

<script>
export default {
  name: 'AllList',
  props: {
    list:{
      type:Array,
      required:true
    }
  },
  data(){
    return{

    }
  },
  methods:{
  openDetail(id){
    this.$emit('openDetail',id)
  }
  }
}
</script>

<style scoped lang="less">
  .my-table {
    border-collapse: collapse;
    width: 100%;
  }

  .my-table td, .my-table th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }

  .my-table th {
    background-color: #f2f2f2;
  }
</style>
